package com.ruoyi.coupons.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.coupons.mapper.CouponsUserMapper;
import com.ruoyi.coupons.domain.CouponsUser;
import com.ruoyi.coupons.service.ICouponsUserService;

/**
 * 用户优惠券Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-11-05
 */
@Service
public class CouponsUserServiceImpl implements ICouponsUserService 
{
    @Autowired
    private CouponsUserMapper couponsUserMapper;

    /**
     * 查询用户优惠券
     * 
     * @param id 用户优惠券主键
     * @return 用户优惠券
     */
    @Override
    public CouponsUser selectCouponsUserById(Long id)
    {
        return couponsUserMapper.selectCouponsUserById(id);
    }

    /**
     * 查询用户优惠券列表
     * 
     * @param couponsUser 用户优惠券
     * @return 用户优惠券
     */
    @Override
    public List<CouponsUser> selectCouponsUserList(CouponsUser couponsUser)
    {
        return couponsUserMapper.selectCouponsUserList(couponsUser);
    }

    /**
     * 新增用户优惠券
     * 
     * @param couponsUser 用户优惠券
     * @return 结果
     */
    @Override
    public int insertCouponsUser(CouponsUser couponsUser)
    {
        return couponsUserMapper.insertCouponsUser(couponsUser);
    }

    /**
     * 修改用户优惠券
     * 
     * @param couponsUser 用户优惠券
     * @return 结果
     */
    @Override
    public int updateCouponsUser(CouponsUser couponsUser)
    {
        return couponsUserMapper.updateCouponsUser(couponsUser);
    }

    /**
     * 批量删除用户优惠券
     * 
     * @param ids 需要删除的用户优惠券主键
     * @return 结果
     */
    @Override
    public int deleteCouponsUserByIds(Long[] ids)
    {
        return couponsUserMapper.deleteCouponsUserByIds(ids);
    }

    /**
     * 删除用户优惠券信息
     * 
     * @param id 用户优惠券主键
     * @return 结果
     */
    @Override
    public int deleteCouponsUserById(Long id)
    {
        return couponsUserMapper.deleteCouponsUserById(id);
    }
}
